<!DOCTYPE html>
<html>
<head>
	<title>Kekule JSDoc Generator</title>
	<meta charset="utf-8">
	<script src="../../kekule.js?min=false"></script>
	<script src="kekule.cmdLines.js"></script>
	<script>
		function $(id)
		{
			return document.getElementById(id);
		}
		function fillCategoryList()
		{
			var categories = Kekule.CmdLineUtils.getSrcFileCategories();
			var listElem = $('listCategories');
			Kekule.DomUtils.clearChildContent(listElem);
			for (var i = 0, l = categories.length; i < l; ++i)
			{
				//listElem.options[listElem.options.length] =  categories[i];
				var optionElem = document.createElement('option');
				optionElem.innerHTML = categories[i];
				optionElem.value = categories[i];
				listElem.appendChild(optionElem);
			}
		}
		function generateJsDocConf()
		{
			$('memoOut').value = '';
			//var category = $('listCategories').value;
			var configs = Kekule.CmdLineUtils.generateDocConfigJsons(/*category*/);
			for (var i = 0, l = configs.length; i < l; ++i)
			{
				$('memoOut').value += JSON.stringify(configs[i], null, '\t') + '\n\n';
			}
		}

		function init()
		{
			fillCategoryList();
		}
	</script>
	<style>
		#memoOut
		{
			width: 90%;
			height: 20em;
		}
	</style>
</head>

<body onload="init()">

<form>
	<textarea id="memoOut"></textarea>
	<br />
	<select id="listCategories"></select>
	<button id="btnGenerate" type="button" onclick="generateJsDocConf()">Generate</button>
</form>

</body>
</html>